/* -------------------------------------------------------------------------------- */
/* -- uGUI - Generic GUI module (C)Achim D?bler, 2015                            -- */
/* -------------------------------------------------------------------------------- */
// uGUI is a generic GUI module for embedded systems.
// This is a free software that is open for education, research and commercial
// developments under license policy of following terms.
//
//  Copyright (C) 2015, Achim D?bler, all rights reserved.
//  URL: http://www.embeddedlightning.com/
//
// * The uGUI module is a free software and there is NO WARRANTY.
// * No restriction on use. You can use, modify and redistribute it for
//   personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
// * Redistributions of source code must retain the above copyright notice.
//
/* -------------------------------------------------------------------------------- */
/* -- REVISION HISTORY                                                           -- */
/* -------------------------------------------------------------------------------- */
//  Oct 11, 2019  V0.31 Checkbox component with all funtions added.
//                      RGB565 color schema added.
//  Mar 18, 2015  V0.3  Driver support added.
//                      Window and object support added.
//                      Touch support added.
//                      Fixed some minor bugs.
//
//  Oct 20, 2014  V0.2  Function UG_DrawRoundFrame() added.
//                      Function UG_FillRoundFrame() added.
//                      Function UG_DrawArc() added.
//                      Fixed some minor bugs.
//
//  Oct 11, 2014  V0.1  First release.
/* -------------------------------------------------------------------------------- */
#include "ugui.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "lcd.h"
/* USER CODE END Includes */

/* Hardware accelerator code ---------------------------------------------------------*/
/* Hardware accelerator for DrawPoint */
void _HW_DrawPoint(UG_S16 x , UG_S16 y , UG_COLOR c)
{
    /* USER CODE BEGIN */
    LCD_Fast_DrawPoint(x,y,c);
    /* USER CODE END */
}

/* Hardware accelerator for UG_DrawLine */
UG_RESULT _HW_DrawLine(UG_S16 x1 , UG_S16 y1 , UG_S16 x2 , UG_S16 y2 , UG_COLOR c)
{
    /* USER CODE BEGIN */
    POINT_COLOR = c;
    LCD_DrawLine(x1,y1,x2,y2);
    /* USER CODE END */
    return UG_RESULT_OK;
}

/* Hardware accelerator for UG_FillFrame */
UG_RESULT _HW_FillFrame(UG_S16 x1 , UG_S16 y1 , UG_S16 x2 , UG_S16 y2 , UG_COLOR c)
{
    /* USER CODE BEGIN */
    LCD_Fill(x1,y1,x2,y2,c);
    /* USER CODE END */
    return UG_RESULT_OK;
}


